import { RegisterPage } from "../root";
import { schema as IndexSchema } from "./list";
import { schema as MySchema } from "./my";
import { schema as VerifySchema } from "./verify";
import { schema as ImportSchema } from "./import";
import { blacklistSchema as BlacklistSchema } from "./blacklist";
import { schema as GroupSchema } from './group';
import { schema as ViewSchema } from './view';
import { schema as EditSchema } from './edit';
import { schema as TeamSchema } from './team';
import { schema as ProjectSchema } from './project';
import { schema as FamilySchema } from './family';
import Group from './group';

RegisterPage({
  path: "volunteer",
  label: "志愿者管理",
  icon: "fa fa-users",
  acl: [
    'volunteer:list',
    'volunteer:my',
    'volunteer:verify',
    'volunteer:blacklist'
  ],
  children: [
    {
      path: "list",
      label: "志愿者列表",
      schema: IndexSchema,
      url: "/volunteer/list",
      acl: 'volunteer:list'
    },

    {
      path: "my",
      label: "我的志愿者",
      schema: MySchema,
      url: "/volunteer/my",
      acl: 'volunteer:my'
    },

    {
      path: "verify",
      label: "申请加入的志愿者",
      schema: VerifySchema,
      url: "/volunteer/verify",
      acl: 'volunteer:verify'
    },
    {
      path: "import",
      label: "导入志愿者",
      schema: ImportSchema,
      url: "/volunteer/import",
      acl: 'volunteer:import'
    },
    {
      path: "family",
      label: "志愿家庭",
      schema: FamilySchema,
      url: "/volunteer/family",
      acl: 'volunteer:family'
    },

    {
      path: "blacklist",
      label: "黑名单",
      schema: BlacklistSchema,
      url: "/volunteer/blacklist",
      acl: 'volunteer:blacklist'
    },
    {
      path: "group",
      label: "成员分组",
      schema: GroupSchema,
      // component:  Group,
      url: "/volunteer/group",
      acl: 'volunteer:group'
    },
    {
      path: "/volunteer/edit/:id",
      label: "编辑志愿者信息",
      schema: EditSchema,
      // url: "/volunteer/edit/:id",
      acl: 'volunteer:edit'
    },
    {
      path: "/volunteer/view/:id",
      label: "查看志愿者信息",
      schema: ViewSchema,
      // url: "/volunteer/view/:id",
      // acl: 'volunteer:view'
    },

    {
      path: "/volunteer/project/:id",
      label: "参与的项目",
      schema: ProjectSchema,
      // url: "/volunteer/project/:id",
      // acl: 'volunteer:project'
    },

    {
      path: "/volunteer/team/:id",
      label: "参与的团队",
      schema: TeamSchema,
      // url: "/volunteer/team/:id",
      // acl: 'volunteer:team'
    },
  ]
});
